home *** CD-ROM | disk | FTP | other *** search
/ Exame Informatica 139 / Exame Informatica 139.iso / Revista / Flash / Uniform Server / Server_Start.bat < prev    next >
Encoding:
DOS Batch File  |  2005-03-17  |  1.5 KB  |  51 lines

  1. : Name: Start Server File
  2. : Created By: The Uniform Server Development Team
  3. : Edited Last By: Olajide Olaolorun (empirex)
  4. : Comment: After start, go to apanel directly.
  5. : To Developers: Implemented %www%, and %apanel% :)
  6.  
  7. @echo off
  8.  
  9. rem use: start mysql console - to start mysql at server start and display console
  10. rem use: start mysql - to start mysql at server start
  11. rem use: start nomysql console - to display console
  12.  
  13. diskw\home\admin\program\pskill.exe Apache.exe
  14. IF NOT ERRORLEVEL 1 goto started
  15. set Disk=%1
  16. IF "%Disk%"=="" set Disk=w
  17. rem create the disk
  18. subst %Disk%: "diskw"
  19. IF ERRORLEVEL 1 goto hint
  20. set apachepath=\usr\local\apache2\
  21. set apacheit=%Disk%:%apachepath%bin\Apache.exe -f %apachepath%conf\httpd.conf -d %apachepath%.
  22. set programit=%Disk%:\home\admin\program\
  23. set closeit=%programit%close.bat %Disk%
  24.  
  25. %Disk%:
  26. cd \usr\local\php
  27. IF "%2"=="mysql" start \usr\local\mysql\bin\mysqld-opt.exe --defaults-file=/usr/local/mysql/bin/my-small.cnf
  28. CLS
  29. echo The server is working on the disk %Disk%:\ [http/127.0.0.1/apanel/]
  30. set www=\www\
  31. set apanel=\home\admin\www\
  32. start %apanel%\redirect.html
  33. IF "%3"=="console" goto console
  34. start %programit%uniserv.exe "%apacheit%" "%closeit%"
  35. goto end
  36. :console
  37. %apacheit%
  38. %closeit%
  39. goto end
  40. :hint
  41. CLS
  42. echo The disk %Disk% is busy. Use 'Disk Start.vbs' [disk letter]
  43. goto pause
  44. :started
  45. CLS
  46. echo ERROR!!! 
  47. echo One of the instances of Apache server is started. Use Stop.bat
  48. :pause
  49. echo .
  50. pause
  51. :end